#include<cstdio>
int getsZiFuChuangChangDu(char a[]){
	int i=0;
	int count=0;
	while(a[i]!='\0'){
		i++;
		count++;
	}
	return count;
}
int main(){
	char a[200];
	gets(a);
	int i=getsZiFuChuangChangDu(a);
	while(i!=0){
		if(a[i-1]=='Z'){
			a[i-1]+=32;
			printf("%c",a[i-1]);
		}
		else if(a[i-1]!='z'){
			printf("%c",a[i-1]);
		}
		i--;
	}
	return 0;
}
